package me.zk.practice1;


import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;
import com.google.common.util.concurrent.ThreadFactoryBuilder;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @Author: zhang kai
 * @Date: 2023/04/20
 * @Description:
 */
public class Test2 {
    public static void main(String[] args) throws InterruptedException {
//        ThreadFactory threadFactory = new ThreadFactoryBuilder()
//                .setNameFormat("测试" + "-%d")
//                .setDaemon(true).build();
//        ExecutorService threadPool = new ThreadPoolExecutor(10, 12, 1000, TimeUnit.MINUTES, new ArrayBlockingQueue<>(200), threadFactory);
//        for (int i = 0; i < 100; i++) {
//            threadPool.submit(()->System.out.println(Thread.currentThread().getName()));
//        }
//
//        TimeUnit.SECONDS.sleep(5);
//        BigDecimal b = BigDecimal.ZERO;
//        BigDecimal b1 = new BigDecimal("1");
//        for (int i = 0; i < 10; i++) {
//           b= b.add(b1);
//        }
//        System.out.println(b);
//        Integer a = null;
//        System.out.println(JSONUtil.toJsonStr(a));
        LocalDateTime time = LocalDateTime.now();
        //前移internalTime时间后的时间
        Date endTime = Date.from(time.plusDays(-21).atZone(ZoneId.systemDefault()).toInstant());
        System.out.println(DateUtil.endOfDay(endTime));

        System.out.println(2&1);
    }
}
